import com.gaojx.lang.annotation.FormRequired
import com.gaojx.lang.bean.InjectBean
import com.gaojx.lang.rule.IRule
import org.slf4j.Logger
import org.slf4j.LoggerFactory

import javax.annotation.Resource

class GroovyFileRule3 implements IRule {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @FormRequired
    private String tableName;

    @Resource
    private InjectBean injectBean;

    @Override
    int getType() {
        return GROOVY_FILE_TYPE;
    }

    @Override
    void printInfo() {
        logger.info("来自Groovy3文件的实现");
        logger.info("========================================")
        logger.info("========================================")

        injectBean.printMessage();

        printInfoAfter();
    }

    void printInfoAfter() {
        logger.info("来自Groovy3文件的实现，{}", "printInfoAfter");
    }
}
